Skip to content

docs(store): add docs about state operators - #799

Merged
markwhitfeld merged 5 commits into
ngxs:masterfrom
arturovt:docs/operators
Feb 2, 2019
Merged

docs(store): add docs about state operators#799
markwhitfeld merged 5 commits into
ngxs:masterfrom
arturovt:docs/operators

Conversation

@arturovt

@arturovt arturovt commented Jan 27, 2019

Copy link
Copy Markdown
Member

PR Checklist

PR Type

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

#786

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@arturovt
arturovt requested a review from deebloo January 27, 2019 19:22

@eranshmil eranshmil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to add a link to this new page. :)

Edit: And maybe add links to Mark's medium post and the main issue.

Comment thread docs/advanced/operators.md Outdated
Comment thread docs/advanced/operators.md Outdated
Comment thread docs/advanced/operators.md
@arturovt

arturovt commented Jan 29, 2019

Copy link
Copy Markdown
Member Author

@markwhitfeld @deebloo gentlemen

Comment thread docs/advanced/operators.md
Comment thread docs/advanced/operators.md Outdated
@arturovt

Copy link
Copy Markdown
Member Author

@markwhitfeld @eranshmil @splincode updated

Comment thread docs/advanced/operators.md Outdated

@eranshmil eranshmil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add the example back as discussed in the comments.

Edit: And add the link in the docs menu.

@arturovt

arturovt commented Jan 30, 2019

Copy link
Copy Markdown
Member Author

@eranshmil Sure, I've just missunderstood, should I replace patch with:

const state = ctx.getState();

ctx.setState(state => ({
  ...state,
  monkeys: []
}));

@markwhitfeld

Copy link
Copy Markdown
Member
const state = ctx.getState();
ctx.setState({
  ...state,
  monkeys: []
});

@markwhitfeld

Copy link
Copy Markdown
Member

Please also add a link to this page as the first item under the advanced menu section. You can label it "State Operators".

@arturovt

arturovt commented Feb 1, 2019

Copy link
Copy Markdown
Member Author

@markwhitfeld 馃殌

@markwhitfeld
markwhitfeld merged commit eaca271 into ngxs:master Feb 2, 2019
@markwhitfeld

Copy link
Copy Markdown
Member

Sorry for the delay. It's been a busy few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants